﻿using System;
using System.Collections.Generic;
using System.IO;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace WCFServer
{
    [ServiceContract]
    public interface IWebDAVServer
    {

        [OperationContract]
        [WebGet(UriTemplate = "/{filename}")]
        Stream WebDAVRequest_GET(string filename);

        [OperationContract]
        [WebInvoke(Method = "PUT", UriTemplate = "/{filename}")]
        Stream WebDAVRequest_PUT(Stream data, string filename);

        [OperationContract]
        [WebInvoke(Method = "DELETE", UriTemplate = "/{filename}")]
        Stream WebDAVRequest_DELETE(string filename);

        [OperationContract]
        [WebInvoke(Method = "PROPFIND", UriTemplate = "/{filename}")]
        Stream WebDAVRequest_PROPFIND(Stream data, string filename);

        [OperationContract]
        [WebInvoke(Method = "UpdateServer", UriTemplate = "/UpdateServer")]
        Stream PeerNode_Update();
    }
}
